/*! \file VertexShaderImpl.cpp
 *	\brief 
 *
 *	created:	2010/04/14
 *	created:	14:4:2010   17:17
 *	filename: 	c:\src\tactics-engine\libs\gd_dx11\VertexShaderImpl.cpp
 *	file path:	c:\src\tactics-engine\libs\gd_dx11
 *	file base:	VertexShaderImpl
 *	file ext:	cpp
 *	author:		Vitalii Trubchaninov
 *				venngraydog@gmail.com
 */

#include "gd_dx11/stdafx.h"
#include "gd_dx11/VertexShaderImpl.h"

#include "gd_dx11/DeviceContext.h"

namespace tt{
namespace gd_dx11{

VertexShaderImpl::VertexShaderImpl( const utils::COMPointer<ID3D11VertexShader>& shader, const utils::COMPointer<ID3D11InputLayout>& inputLayout  )
: m_shader(shader)
, m_inputLayout(inputLayout)
{

}

VertexShaderImpl::~VertexShaderImpl()
{

}

void VertexShaderImpl::onApply( gd::DeviceContext* deviceContext )
{
	DeviceContext* dx11DeviceContext = getDx11Context(deviceContext);
	dx11DeviceContext->setVertexShader(m_shader);
	dx11DeviceContext->setInputLayout(m_inputLayout);
}

} //namespace gd_dx11
} //namespace tt